package com.design.pattern.behavior.strategy.pay;

import lombok.AllArgsConstructor;
import lombok.Data;

@AllArgsConstructor
@Data
public class Order {
    private String uid;
    private String orderId;
    private double amount;


    public void pay(String payKey){
        Payment payment = PayStrategy.get(payKey);
        payment.pay(uid, amount);
        System.out.println("欢迎使用" + payment.getName() + "!");
        System.out.println("交易订单" + uid + " , " + "交易金额为：" + amount);
    }

}
